package com.gitee.wsl.text.regex.sample


//24小时制时间（HH:mm:ss）
val Regex.Companion.TIME_24: Regex
    get() = """^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d${'$'}""".toRegex()

//12小时制时间（hh:mm:ss）
val Regex.Companion.TIME_12: Regex
    get() = """^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d${'$'}""".toRegex()

/**
 * 生日
 */
val Regex.Companion.CHINA_BIRTHDAY: Regex
    get() = "^(\\d{2,4})([/\\-.年]?)(\\d{1,2})([/\\-.月]?)(\\d{1,2})日?$".toRegex()

/**
 * 时间正则
 */
val Regex.Companion.CHINA_TIME: Regex
    get() = "\\d{1,2}[:时]\\d{1,2}([:分]\\d{1,2})?秒?".toRegex()
